Clock()

General System Function

Syntax samples

CLOCK({<time unit>})

IF CLOCK(DAY) >= 1.5 THEN PAUSE

Attr1 = CLOCK()

Description

Returns value of the elapsed simulation time in the units specified. Clock units should be kept consistent when comparing values. If an attribute has been assigned a time in minutes, any time value compared with that attribute should also be in minutes.

When no units are specified in the parentheses in the clock function, ProModel returns the default time unit specified in the General Information.

Valid In

Any logic and most fields, except those fields evaluated at translation. For a list of fields evaluated at translation, see the Appendix A.

Components

<time unit>

The elapsed simulation time will be returned in this unit. This may be HR, MIN, SEC, DAY, WK. If omitted, the value returned will be in the default time units as specified in the General Information dialog box. When using CLOCK() to capture a time for later use with the LOG statement, the units should be omitted.

See Also

General Information and Time Expressions.